gdk_window_attributes_type_get_type
gdk_window_beep
gdk_window_begin_move_drag
+gdk_window_begin_move_drag_for_device
gdk_window_begin_paint_rect
gdk_window_begin_paint_region
gdk_window_begin_resize_drag
+gdk_window_begin_resize_drag_for_device
gdk_window_window_class_get_type
gdk_window_configure_finished
gdk_window_constrain_size
}
/**
- * gdk_window_begin_resize_drag:
+ * gdk_window_begin_resize_drag_for_device:
* @window: a toplevel #GdkWindow
* @edge: the edge or corner from which the drag is started
+ * @device: the device used for the operation
* @button: the button being used to drag
* @root_x: root window X coordinate of mouse click that began the drag
* @root_y: root window Y coordinate of mouse click that began the drag
* with window managers that support the <ulink url="http://www.freedesktop.org/Standards/wm-spec">Extended Window Manager Hints</ulink>, but has a
* fallback implementation for other window managers.
*
- **/
+ * Since: 3.4
+ */
+void
+gdk_window_begin_resize_drag_for_device (GdkWindow *window,
+ GdkWindowEdge edge,
+ GdkDevice *device,
+ gint button,
+ gint root_x,
+ gint root_y,
+ guint32 timestamp)
+{
+ GDK_WINDOW_IMPL_GET_CLASS (window->impl)->begin_resize_drag (window, edge, device, button, root_x, root_y, timestamp);
+}
+
+/**
+ * gdk_window_begin_resize_drag:
+ * @window: a toplevel #GdkWindow
+ * @edge: the edge or corner from which the drag is started
+ * @button: the button being used to drag
+ * @root_x: root window X coordinate of mouse click that began the drag
+ * @root_y: root window Y coordinate of mouse click that began the drag
+ * @timestamp: timestamp of mouse click that began the drag (use gdk_event_get_time())
+ *
+ * Begins a window resize operation (for a toplevel window).
+ *
+ * This function assumes that the drag is controlled by the
+ * client pointer device, use gdk_window_begin_resize_drag_for_device()
+ * to begin a drag with a different device.
+ */
void
gdk_window_begin_resize_drag (GdkWindow *window,
GdkWindowEdge edge,
gint root_y,
guint32 timestamp)
{
- GDK_WINDOW_IMPL_GET_CLASS (window->impl)->begin_resize_drag (window, edge, button, root_x, root_y, timestamp);
+ GdkDeviceManager *device_manager;
+ GdkDevice *device;
+
+ device_manager = gdk_display_get_device_manager (gdk_window_get_display (window));
+ device = gdk_device_manager_get_client_pointer (device_manager);
+ gdk_window_begin_resize_drag_for_device (window, edge,
+ device, button, root_x, root_y, timestamp);
}
/**
- * gdk_window_begin_move_drag:
+ * gdk_window_begin_move_drag_for_device:
* @window: a toplevel #GdkWindow
+ * @device: the device used for the operation
* @button: the button being used to drag
* @root_x: root window X coordinate of mouse click that began the drag
* @root_y: root window Y coordinate of mouse click that began the drag
* @timestamp: timestamp of mouse click that began the drag
*
- * Begins a window move operation (for a toplevel window). You might
- * use this function to implement a "window move grip," for
+ * Begins a window move operation (for a toplevel window).
+ * You might use this function to implement a "window move grip," for
* example. The function works best with window managers that support
* the <ulink url="http://www.freedesktop.org/Standards/wm-spec">Extended
* Window Manager Hints</ulink>, but has a fallback implementation for
* other window managers.
*
- **/
+ * Since: 3.4
+ */
+void
+gdk_window_begin_move_drag_for_device (GdkWindow *window,
+ GdkDevice *device,
+ gint button,
+ gint root_x,
+ gint root_y,
+ guint32 timestamp)
+{
+ GDK_WINDOW_IMPL_GET_CLASS (window->impl)->begin_move_drag (window,
+ device, button, root_x, root_y, timestamp);
+}
+
+/**
+ * gdk_window_begin_move_drag:
+ * @window: a toplevel #GdkWindow
+ * @button: the button being used to drag
+ * @root_x: root window X coordinate of mouse click that began the drag
+ * @root_y: root window Y coordinate of mouse click that began the drag
+ * @timestamp: timestamp of mouse click that began the drag
+ *
+ * Begins a window move operation (for a toplevel window).
+ *
+ * This function assumes that the drag is controlled by the
+ * client pointer device, use gdk_window_begin_move_drag_for_device()
+ * to begin a drag with a different device.
+ */
void
gdk_window_begin_move_drag (GdkWindow *window,
gint button,
gint root_y,
guint32 timestamp)
{
- GDK_WINDOW_IMPL_GET_CLASS (window->impl)->begin_move_drag (window, button, root_x, root_y, timestamp);
+ GdkDeviceManager *device_manager;
+ GdkDevice *device;
+
+ device_manager = gdk_display_get_device_manager (gdk_window_get_display (window));
+ device = gdk_device_manager_get_client_pointer (device_manager);
+ gdk_window_begin_move_drag_for_device (window, device, button, root_x, root_y, timestamp);
}
/**
GdkDragProtocol
gdk_window_get_drag_protocol(GdkWindow *window,
- GdkWindow **target);
-
-void gdk_window_begin_resize_drag (GdkWindow *window,
- GdkWindowEdge edge,
- gint button,
- gint root_x,
- gint root_y,
- guint32 timestamp);
-void gdk_window_begin_move_drag (GdkWindow *window,
- gint button,
- gint root_x,
- gint root_y,
- guint32 timestamp);
+ GdkWindow **target);
+
+void gdk_window_begin_resize_drag (GdkWindow *window,
+ GdkWindowEdge edge,
+ gint button,
+ gint root_x,
+ gint root_y,
+ guint32 timestamp);
+void gdk_window_begin_resize_drag_for_device (GdkWindow *window,
+ GdkWindowEdge edge,
+ GdkDevice *device,
+ gint button,
+ gint root_x,
+ gint root_y,
+ guint32 timestamp);
+void gdk_window_begin_move_drag (GdkWindow *window,
+ gint button,
+ gint root_x,
+ gint root_y,
+ guint32 timestamp);
+void gdk_window_begin_move_drag_for_device (GdkWindow *window,
+ GdkDevice *device,
+ gint button,
+ gint root_x,
+ gint root_y,
+ guint32 timestamp);
/* Interface for dirty-region queueing */
void gdk_window_invalidate_rect (GdkWindow *window,
void (* set_functions) (GdkWindow *window,
GdkWMFunction functions);
void (* begin_resize_drag) (GdkWindow *window,
- GdkWindowEdge edge,
- gint button,
- gint root_x,
- gint root_y,
- guint32 timestamp);
+ GdkWindowEdge edge,
+ GdkDevice *device,
+ gint button,
+ gint root_x,
+ gint root_y,
+ guint32 timestamp);
void (* begin_move_drag) (GdkWindow *window,
- gint button,
- gint root_x,
- gint root_y,
- guint32 timestamp);
+ GdkDevice *device,
+ gint button,
+ gint root_x,
+ gint root_y,
+ guint32 timestamp);
void (* enable_synchronized_configure) (GdkWindow *window);
void (* configure_finished) (GdkWindow *window);
void (* set_opacity) (GdkWindow *window,
static void
wmspec_moveresize (GdkWindow *window,
gint direction,
+ GdkDevice *device,
gint root_x,
gint root_y,
guint32 timestamp)
XClientMessageEvent xclient;
/* Release passive grab */
- gdk_device_ungrab (display->core_pointer, timestamp);
+ gdk_device_ungrab (device, timestamp);
memset (&xclient, 0, sizeof (xclient));
xclient.type = ClientMessage;
GdkWindow *moveresize_emulation_window;
gboolean is_resize;
GdkWindowEdge resize_edge;
+ GdkDevice *device;
gint moveresize_button;
gint moveresize_x;
gint moveresize_y;
static void
wmspec_resize_drag (GdkWindow *window,
GdkWindowEdge edge,
+ GdkDevice *device,
gint button,
gint root_x,
gint root_y,
return;
}
- wmspec_moveresize (window, direction, root_x, root_y, timestamp);
+ wmspec_moveresize (window, direction, device, root_x, root_y, timestamp);
}
static MoveResizeData *
gdk_window_show (mv_resize->moveresize_emulation_window);
- status = gdk_device_grab (gdk_window_get_display (mv_resize->moveresize_emulation_window)->core_pointer,
+ status = gdk_device_grab (mv_resize->device,
mv_resize->moveresize_emulation_window,
GDK_OWNERSHIP_NONE,
FALSE,
static void
emulate_resize_drag (GdkWindow *window,
GdkWindowEdge edge,
+ GdkDevice *device,
gint button,
gint root_x,
gint root_y,
mv_resize->is_resize = TRUE;
mv_resize->moveresize_button = button;
mv_resize->resize_edge = edge;
+ mv_resize->device = device;
mv_resize->moveresize_x = root_x;
mv_resize->moveresize_y = root_y;
mv_resize->moveresize_window = g_object_ref (window);
static void
emulate_move_drag (GdkWindow *window,
+ GdkDevice *device,
gint button,
gint root_x,
gint root_y,
MoveResizeData *mv_resize = get_move_resize_data (GDK_WINDOW_DISPLAY (window), TRUE);
mv_resize->is_resize = FALSE;
+ mv_resize->device = device;
mv_resize->moveresize_button = button;
mv_resize->moveresize_x = root_x;
mv_resize->moveresize_y = root_y;
static void
gdk_x11_window_begin_resize_drag (GdkWindow *window,
- GdkWindowEdge edge,
- gint button,
- gint root_x,
- gint root_y,
- guint32 timestamp)
+ GdkWindowEdge edge,
+ GdkDevice *device,
+ gint button,
+ gint root_x,
+ gint root_y,
+ guint32 timestamp)
{
if (GDK_WINDOW_DESTROYED (window) ||
!WINDOW_IS_TOPLEVEL_OR_FOREIGN (window))
if (gdk_x11_screen_supports_net_wm_hint (GDK_WINDOW_SCREEN (window),
gdk_atom_intern_static_string ("_NET_WM_MOVERESIZE")))
- wmspec_resize_drag (window, edge, button, root_x, root_y, timestamp);
+ wmspec_resize_drag (window, edge, device, button, root_x, root_y, timestamp);
else
- emulate_resize_drag (window, edge, button, root_x, root_y, timestamp);
+ emulate_resize_drag (window, edge, device, button, root_x, root_y, timestamp);
}
static void
gdk_x11_window_begin_move_drag (GdkWindow *window,
+ GdkDevice *device,
gint button,
gint root_x,
gint root_y,
if (gdk_x11_screen_supports_net_wm_hint (GDK_WINDOW_SCREEN (window),
gdk_atom_intern_static_string ("_NET_WM_MOVERESIZE")))
- wmspec_moveresize (window, _NET_WM_MOVERESIZE_MOVE, root_x, root_y,
+ wmspec_moveresize (window, _NET_WM_MOVERESIZE_MOVE, device, root_x, root_y,
timestamp);
else
- emulate_move_drag (window, button, root_x, root_y, timestamp);
+ emulate_move_drag (window, device, button, root_x, root_y, timestamp);
}
static void